package com.ruoyi.att.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.att.mapper.ReportKeypersonDailyMapper;
import com.ruoyi.att.domain.ReportKeypersonDaily;
import com.ruoyi.att.service.IReportKeypersonDailyService;

/**
 * 关键人员考勤日报Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-21
 */
@Service
public class ReportKeypersonDailyServiceImpl implements IReportKeypersonDailyService 
{
    @Autowired
    private ReportKeypersonDailyMapper reportKeypersonDailyMapper;

    /**
     * 查询关键人员考勤日报
     * 
     * @param id 关键人员考勤日报主键
     * @return 关键人员考勤日报
     */
    @Override
    public ReportKeypersonDaily selectReportKeypersonDailyById(Long id)
    {
        return reportKeypersonDailyMapper.selectReportKeypersonDailyById(id);
    }

    /**
     * 查询关键人员考勤日报列表
     * 
     * @param reportKeypersonDaily 关键人员考勤日报
     * @return 关键人员考勤日报
     */
    @Override
    public List<ReportKeypersonDaily> selectReportKeypersonDailyList(ReportKeypersonDaily reportKeypersonDaily)
    {
        return reportKeypersonDailyMapper.selectReportKeypersonDailyList(reportKeypersonDaily);
    }

    /**
     * 新增关键人员考勤日报
     * 
     * @param reportKeypersonDaily 关键人员考勤日报
     * @return 结果
     */
    @Override
    public int insertReportKeypersonDaily(ReportKeypersonDaily reportKeypersonDaily)
    {
        reportKeypersonDaily.setCreateTime(DateUtils.getNowDate());
        return reportKeypersonDailyMapper.insertReportKeypersonDaily(reportKeypersonDaily);
    }

    /**
     * 修改关键人员考勤日报
     * 
     * @param reportKeypersonDaily 关键人员考勤日报
     * @return 结果
     */
    @Override
    public int updateReportKeypersonDaily(ReportKeypersonDaily reportKeypersonDaily)
    {
        reportKeypersonDaily.setUpdateTime(DateUtils.getNowDate());
        return reportKeypersonDailyMapper.updateReportKeypersonDaily(reportKeypersonDaily);
    }

    /**
     * 批量删除关键人员考勤日报
     * 
     * @param ids 需要删除的关键人员考勤日报主键
     * @return 结果
     */
    @Override
    public int deleteReportKeypersonDailyByIds(Long[] ids)
    {
        return reportKeypersonDailyMapper.deleteReportKeypersonDailyByIds(ids);
    }

    /**
     * 删除关键人员考勤日报信息
     * 
     * @param id 关键人员考勤日报主键
     * @return 结果
     */
    @Override
    public int deleteReportKeypersonDailyById(Long id)
    {
        return reportKeypersonDailyMapper.deleteReportKeypersonDailyById(id);
    }
}
